/**
 *	@file	safaril_def.h
 *	@brief	サファリレイアウト　リテラル定義
 *	@author	Miyuki Iwasawa
 */

#ifndef __H_SAFARIL_DEF_H__
#define __H_SAFARIL_DEF_H__

///フレームナンバー定義
#define MFRM_MSG	(GF_BGL_FRAME0_M)
#define MFRM_FILTER	(GF_BGL_FRAME1_M)
#define MFRM_BLOCK	(GF_BGL_FRAME2_M)
#define MFRM_BACK	(GF_BGL_FRAME3_M)

#define SFRM_FILTER	(GF_BGL_FRAME0_S)
#define SFRM_PANEL	(GF_BGL_FRAME1_S)
#define SFRM_BLOCK	(GF_BGL_FRAME2_S)
#define SFRM_BACK	(GF_BGL_FRAME3_S)

///シーケンスNo定義
enum{
 SEQ_INIT,
 SEQ_END,
 SEQ_MODE_BLOCK,
 SEQ_MODE_CHANGE,
 SEQ_MODE_SORT,
 SEQ_FADEIN,
 SEQ_FADEOUT,
 SEQ_EXIT,
};

///////////////////////////////////////////////////////////////
//ローカルシーケンス定義
enum{
 LSEQ_NULL,
 LSEQ_LIST_SEL,
 LSEQ_MODE_SHIFT,
 LSEQ_EFF,
 LSEQ_END,
};

enum{
 MODE_BLOCK,
 MODE_CHANGE,
 MODE_SORT,
};

#define PAGE_MAX	(2)

//=======================================
///アルファ値設定
//=======================================
#define ALPHA_SECOND	(28)
#define ALPHA_FIRST		(4)

#define ALPHA_MASK_1ST	(GX_BLEND_PLANEMASK_BG1)
#define ALPHA_MASK_2ND	(GX_BLEND_PLANEMASK_BG2|GX_BLEND_PLANEMASK_BG3|GX_BLEND_PLANEMASK_OBJ)

#define ALPHA_MASKS_1ST	(GX_BLEND_PLANEMASK_BG0)
#define ALPHA_MASKS_2ND	(GX_BLEND_PLANEMASK_BG1|GX_BLEND_PLANEMASK_BG2|\
						 GX_BLEND_PLANEMASK_BG3|GX_BLEND_PLANEMASK_OBJ)


#define PAD_KEY_ALL	(PAD_KEY_LEFT|PAD_KEY_RIGHT|PAD_KEY_UP|PAD_KEY_DOWN)

///////////////////////////////////////////////////////////////
//アクターリソース
enum{
 RESACT_NORMAL,
 RESACT_NORMAL_SUB,
};

enum{
 ANM_N_CURSOR,
 ANM_N_BCURSOR,
 ANM_N_FCURSOR,
 ANM_N_ACURSOR,
 ANM_N_ALLOW_L,
 ANM_N_ALLOW_R,
 ANM_N_ALLOW_LF,
 ANM_N_ALLOW_RF,
};

////////////////////////////////////////////////////////////////
///メッセージ参照定義
enum{
 MSGIDX_SEL_BACK,
 MSGIDX_SEL_DECIDE,
 MSGIDX_SEL_CANCEL,
 MSGIDX_SEL_CHANGE,
 MSGIDX_SEL_REPLACE,
 MSGIDX_SEL_MAX,
};
enum{
 MSGIDX_EXP_DO,
 MSGIDX_EXP_CHANGE,
 MSGIDX_EXP_SORT,
 MSGIDX_EXP_WARN,
 MSGIDX_EXP_MAX
};

///フォントカラー
#define FMSG_COL_BACK	(2)
#define FMSG_FCOL	(GF_PRINTCOLOR_MAKE(3,1,FMSG_COL_BACK))
#define EXPMSG_COL_BACK	(0xE)
#define EXPMSG_FCOL	(GF_PRINTCOLOR_MAKE(0xD,0xC,EXPMSG_COL_BACK))

////////////////////////////////////////////////////////////////////////
///BMPウィンドウ
enum{
 WIN_EXP,
 WIN_WARN,
 WIN_BACK,
 WIN_PAGE,
 WIN_INFO_00,
 WIN_INFO_01_01,
 WIN_INFO_01_02,
 WIN_INFO_02_01,
 WIN_INFO_02_02,
 WIN_INFO_03_01,
 WIN_INFO_03_02,
 WIN_INFO_04_01,
 WIN_INFO_04_02,
 WIN_INFO_05_01,
 WIN_INFO_05_02,
 WIN_MAX,
};

#define BGU_PANELCHAR_BASE	(1)

#define BGD_BMPLCHAR_BASE	(1024)
#define BGU_BMPLCHAR_BASE	(1024)
#define FONT_PAL	(12)

#define SBOX_WCGX	(BGD_BMPLCHAR_BASE-SBOX_WINCGX_SIZ)
#define SBOX_FCGX_SIZ	(8*2*3)
#define SBOX_FCGX	(SBOX_WCGX-SBOX_FCGX_SIZ)
#define SBOX_PAL	(15)

#define BMPL_YESNO_PAL	(13)
#define BMPL_YESNO_CGX	(SBOX_FCGX-TOUCH_SW_USE_CHAR_NUM)
#define BMPL_YESNO_PX	(26)
#define BMPL_YESNO_PY	(16)
#define BMPL_YESNO_FRM	(MFRM_MSG)

///メッセージウィンドウ
#define BMPL_EXP_PX	(1)
#define BMPL_EXP_PY	(21)
#define BMPL_EXP_SX	(22)
#define BMPL_EXP_SY	(3)
#define BMPL_EXP_SIZ	(BMPL_EXP_SX*BMPL_EXP_SY)
#define BMPL_EXP_FRM	(MFRM_MSG)
#define BMPL_EXP_PAL	(4)
#define BMPL_EXP_CGX	(BMPL_YESNO_CGX-BMPL_EXP_SIZ)

#define BMPL_WARN_PX	(BMPL_EXP_PX)
#define BMPL_WARN_PY	(BMPL_EXP_PY-2)
#define BMPL_WARN_SX	(BMPL_EXP_SX)
#define BMPL_WARN_SY	(BMPL_EXP_SY+2)
#define BMPL_WARN_SIZ	(BMPL_WARN_SX*BMPL_WARN_SY)
#define BMPL_WARN_FRM	(MFRM_MSG)
#define BMPL_WARN_PAL	(4)
#define BMPL_WARN_CGX	(BMPL_YESNO_CGX-BMPL_WARN_SIZ)

///WIN_EXPとWIN_WARNのフレームデザインカラーナンバー
#define WIN_EXP_FRAME_COL	(6)

///戻るボタンウィンドウ
#define BMPL_BACK_PX	(25)
#define BMPL_BACK_PY	(21)
#define BMPL_BACK_SX	(6)
#define BMPL_BACK_SY	(3)
#define BMPL_BACK_SIZ	(BMPL_BACK_SX*BMPL_BACK_SY)
#define BMPL_BACK_FRM	(MFRM_BACK)
#define BMPL_BACK_PAL	(FONT_PAL)
#define BMPL_BACK_CGX	(BMPL_WARN_CGX-BMPL_BACK_SIZ)

///ページ
#define BMPL_PAGE_PX	(13)
#define BMPL_PAGE_PY	(0)
#define BMPL_PAGE_SX	(6)
#define BMPL_PAGE_SY	(2)
#define BMPL_PAGE_SIZ	(BMPL_PAGE_SX*BMPL_PAGE_SY)
#define BMPL_PAGE_FRM	(MFRM_BACK)
#define BMPL_PAGE_PAL	(FONT_PAL)
#define BMPL_PAGE_CGX	(BMPL_BACK_CGX-BMPL_PAGE_SIZ)

#define BMPL_OBJ_MAX	(1)
#define BMPL_OBJ_SX		(6)
#define BMPL_OBJ_SY		(2)
#define BMPL_OBJ_PAL	(SAFARIL_NOAM_PALIDX)
#define BMPL_OBJ_CGX	(BMPL_PAGE_CGX-BMPL_OBJ_SX*BMPL_OBJ_SY)


///////////////////////////////////////////////////////////////////////
//上画面ウィンドウ定義
#define BMPL_INFO_PAL	(5)
#define BMPL_INFO_FRM	(SFRM_BACK)

#define BMPL_INFO_PY	(1)
#define BMPL_INFO_PX1	(1)
#define BMPL_INFO_SX1	(22)
#define BMPL_INFO_PX2	(26)
#define BMPL_INFO_SX2	(5)
#define BMPL_INFO_SY1	(4)
#define BMPL_INFO_SY2	(2)

///上画面情報ウィンドウ
#define BMPL_INFO_00_PX		(2)
#define BMPL_INFO_00_PY		(21)
#define BMPL_INFO_00_SX		(28)
#define BMPL_INFO_00_SY		(3)
#define BMPL_INFO_00_SIZ	(BMPL_INFO_00_SX*BMPL_INFO_00_SY)
#define BMPL_INFO_00_CGX	(BGU_BMPLCHAR_BASE-BMPL_INFO_00_SIZ)

///////////////////////////////////////////////////////////////////////
//選択リスト
#define SBOX_SEL_CT	(3)
#define SBOX_DC_CT	(2)

///////////////////////////////////////////////////////////////////////
//BG表示位置
#define PANEL_CSX	(8)
#define PANEL_CSY	(8)

#define PANEL1_CPX	(3)
#define PANEL1_CPY	(3)
#define PANEL1_COX	(9)
#define PANEL1_COY	(9)
#define PANEL2_CPX	(2)
#define PANEL2_CPY	(3)
#define PANEL2_COX	(10)
#define PANEL2_COY	(9)

///////////////////////////////////////////////////////////////////////
//アクター表示位置
#define PANEL1_PX	((PANEL1_CPX+4)*8)
#define PANEL1_PY	((PANEL1_CPY+4)*8)
#define PANEL1_OX	(PANEL1_COX*8)
#define PANEL1_OY	(PANEL1_COY*8)

#define PANEL2_PX	((PANEL2_CPX+4)*8)
#define PANEL2_PY	((PANEL2_CPY+4)*8)
#define PANEL2_OX	(PANEL2_COX*8)
#define PANEL2_OY	(PANEL2_COY*8)

#define PANEL1_PRI	(2)
#define PANEL1_SPRI	(128)
#define PANEL2_PRI	(3)
#define PANEL2_SPRI	(128)
#define BACK_PRI	(3)

///戻るボタン位置
#define BACK_BTN_PX	(28*8)
#define BACK_BTN_PY	(22*8+4)

//矢印表示位置
#define ALLOW_L_PX	(10*8)
#define ALLOW_PY	(2*8)
#define ALLOW_R_PX	(22*8)

//////////////////////////////////////////////////
//スクロールパラメータ
#define BG_SCRL_HC		(24)
#define BGD_SCRL_H		(24*8)
#define BGU_SCRL_H		(24*8)
#define BG_SCRL_TIME	(8)
#define BG_SCRL_DIF	(BGD_SCRL_H/BG_SCRL_TIME)

#define SCRL_LEFT		(0)
#define SCRL_RIGHT		(1)

#define PANEL_SCRL_W	(32*8)
#define PANEL_SCRL_TIME	(8)
#define PANEL_SCRL_DIF	(PANEL_SCRL_W/PANEL_SCRL_TIME)

#define SORT_SCRL_H	(12*8)
#define SORT_SCRL_TIME	(8)
#define SORT_SCRL_DIF	(SORT_SCRL_H/SORT_SCRL_TIME)

/////////////////////////////////////////////////////////////////
//タッチパネル
#define TP_BACK_PX	(24*8)
#define TP_BACK_PY	(21*8)
#define TP_BACK_SX	(8*8)
#define TP_BACK_SY	(3*8)

#define TP_PANEL_SX		(PANEL_CSX*8)
#define TP_PANEL_SY		(PANEL_CSY*8)
#define TP_PANEL_PY01	(PANEL1_CPY*8)
#define TP_PANEL_PY02	(TP_PANEL_PY01+PANEL1_OY)

#define TP_PANEL1_PX01	(PANEL1_CPX*8)
#define TP_PANEL1_PX02	(TP_PANEL1_PX01+PANEL1_OX)
#define TP_PANEL1_PX03	(TP_PANEL1_PX02+PANEL1_OX)
#define TP_PANEL2_PX01	(PANEL2_CPX*8)
#define TP_PANEL2_PX02	(TP_PANEL2_PX01+PANEL2_OX)
#define TP_PANEL2_PX03	(TP_PANEL2_PX02+PANEL2_OX)

#define TP_ALLOWL_PX	(ALLOW_L_PX-16)
#define TP_ALLOWR_PX	(ALLOW_R_PX-16)
#define TP_ALLOW_PY		(ALLOW_PY-10)
#define TP_ALLOW_SX		(4*8)
#define TP_ALLOW_SY		(20)

#endif	//__H_SAFARIL_DEF_H__
